home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Include / include_i / intuition / classes.i < prev    next >
Encoding:
Text File  |  1999-10-20  |  2.9 KB  |  95 lines

  1.     IFND INTUITION_CLASSES_I
  2. INTUITION_CLASSES_I SET 1
  3. **
  4. **  $VER: classes.i 40.0 (15.2.1994)
  5. **  Includes Release 44.1
  6. **
  7. **  Only used by class implementors
  8. **
  9. **  (C) Copyright 1989-1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13. ;******************************************************************************
  14.  
  15.     IFND EXEC_TYPES_I
  16.     INCLUDE "exec/types.i"
  17.     ENDC
  18.  
  19.     IFND EXEC_LIBRARIES_I
  20.     INCLUDE "exec/libraries.i"
  21.     ENDC
  22.  
  23.     IFND UTILITY_HOOKS_I
  24.     INCLUDE "utility/hooks.i"
  25.     ENDC
  26.  
  27.     IFND INTUITION_CLASSUSR_I
  28.     INCLUDE "intuition/classusr.i"
  29.     ENDC
  30.  
  31. ;******************************************************************************
  32. ;***************** "White Box" access to struct IClass ************************
  33. ;******************************************************************************
  34.  
  35.  STRUCTURE ICLASS,0
  36.     STRUCT     cl_Dispatcher,h_SIZEOF        ; Class dispatcher
  37.     ULONG     cl_Reserved            ; Must be 0
  38.     APTR     cl_Super            ; Pointer to superclass
  39.     APTR     cl_ID                ; Class ID
  40.  
  41.     UWORD     cl_InstOffset            ; Offset of instance data
  42.     UWORD     cl_InstSize            ; Size of instance data
  43.  
  44.     ULONG     cl_UserData            ; Class global data
  45.     ULONG     cl_SubclassCount        ; Number of subclasses
  46.     ULONG     cl_ObjectCount            ; Number of objects
  47.     ULONG     cl_Flags
  48.  
  49.     ; no iclass_SIZEOF because only Intuition allocates these
  50.  
  51. ;******************************************************************************
  52.  
  53. ; defined values of cl_Flags
  54. CLB_INLIST EQU 0
  55. CLF_INLIST EQU $00000001    ; class in in public class list
  56.  
  57. ; see classes.h for common calculations (sorry, no macros yet)
  58.  
  59. ;*****************************************************************************
  60. ;***************** "White box" access to struct _Object **********************
  61. ;*****************************************************************************
  62.  
  63. ; We have this, the instance data of the root class, PRECEDING the "object".
  64. ; This is so that Gadget objects are Gadget pointers, and so on.  If this
  65. ; structure grows, it will always have o_Class at the end, so the macro
  66. ; OCLASS(o) will always have the same offset back from the pointer returned
  67. ; from NewObject().
  68. ;
  69. ; This data structure is subject to change.  Do not use the o_Node embedded
  70. ; structure.
  71.  
  72.  STRUCTURE _Object,0
  73.     STRUCT     o_Node,MLN_SIZE
  74.     APTR     o_Class
  75.  
  76.     ; this value may change but difference between it and offset of o_Class
  77.     ; will remain constant
  78.     LABEL     _object_SIZEOF
  79.  
  80. ;******************************************************************************
  81.  
  82. ; BOOPSI class libraries should use this structure as the base for their
  83. ; library data.  This allows developers to obtain the class pointer for
  84. ; performing object-less inquiries.
  85.  
  86.   STRUCTURE ClassLibrary,0
  87.     STRUCT     cl_Lib,LIB_SIZE    ; Embedded library
  88.     UWORD     cl_Pad            ; Align the structure
  89.     APTR     cl_Class        ; Class pointer
  90.     LABEL     ClassLibrary_SIZEOF
  91.  
  92. ;******************************************************************************
  93.  
  94.     ENDC
  95.